package leetCode.hw.math;

public class HJ108Solution implements HJ108 {

    @Override
    public int minCommMulNum(int a, int b) {
        if(a%b==0) return a;
        if(b%a==0) return b;
        int n = Math.max(a, b);
        int add = n;
        while (n%a!=0||n%b!=0){
            n+=add;
        }
        return n;
    }

    public static void main(String[] args) {
        System.out.println(new HJ108Solution().minCommMulNum(502,94278));
    }
}
